package com.imooc.api.controller.user;

import com.imooc.grace.result.GraceJSONResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Date;

/**
 * 用户管理相关
 */
@RequestMapping("appUser")
public interface AppUserMngControllerApi {

    /**
     * 查询所有网站用户
     */
    @PostMapping("queryAll")
    GraceJSONResult queryAll(@RequestParam String nickname, @RequestParam Integer status, @RequestParam Date startDate, @RequestParam Date endDate, @RequestParam Integer page, @RequestParam Integer pageSize);

    /**
     * 查看用户详情
     */
    @PostMapping("userDetail")
    GraceJSONResult userDetail(@RequestParam String userId);

    /**
     * 冻结用户或者解冻用户
     */
    @PostMapping("freezeUserOrNot")
    GraceJSONResult freezeUserOrNot(@RequestParam String userId, @RequestParam Integer doStatus);

    /**
     * 根据用户id查询用户
     */
    @GetMapping("queryByIds")
    GraceJSONResult queryAll(@RequestParam String userIds);

}
